﻿@using Orchard.Utility.Extensions
@model Orchard.Core.Common.ViewModels.TextFieldSettingsEventsViewModel

<fieldset>
    <div>
        <label for="@Html.FieldIdFor(m => m.Settings.Flavor)" class="forcheckbox">@T("Display options")</label>  
        <select id="@Html.FieldIdFor(m => m.Settings.Flavor)" name="@Html.FieldNameFor(m => m.Settings.Flavor)">
            @Html.SelectOption("", String.IsNullOrWhiteSpace(Model.Settings.Flavor), T("Default flavor").ToString())
            @foreach(string flavor in Model.Flavors) {
                @Html.SelectOption(flavor, flavor.Equals(Model.Settings.Flavor, StringComparison.OrdinalIgnoreCase), flavor.CamelFriendly())
            }
        </select> 

        @Html.ValidationMessageFor(m => m.Settings.Flavor)
    </div>
</fieldset>
<fieldset>
    <div>
        @Html.CheckBoxFor(m => m.Settings.Required) <label for="@Html.FieldIdFor(m => m.Settings.Required)" class="forcheckbox">@T("Required")</label>
        <span class="hint">@T("Check to ensure the user enters a value in this field.")</span>
    </div>
</fieldset>
<fieldset>
    <label for="@Html.FieldIdFor(m => m.Settings.Hint)">@T("Help text")</label>
    @Html.TextAreaFor(m => m.Settings.Hint, new { @class = "textMedium", rows = "5" })
	<span class="hint">@T("The help text is written under the field when authors are editing the content item.")</span>
    @Html.ValidationMessageFor(m => m.Settings.Hint)
</fieldset>